package com.spring.cn.annotation.controller;

import com.spring.cn.annotation.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * @author liangd
 * date 2020-11-14 15:40
 * code
 */
@Controller
public class UserController {

    /* private final UserService userService;

     @Autowired
     public UserController(UserService userService) {
         this.userService = userService;
     }*/
    @Resource
    private UserService userService;

    public void excute() {
        System.out.println("UserController excute...");
        userService.add();
    }
}
